
<meta charset="utf-8">
<script type="text/javascript" src="<?=base_url();?>java_scripts/vote_scripts.js"></script>
<script type="text/javascript" src="<?=base_url();?>java_scripts/jquery-1.5.1.js"></script>
<script type="text/javascript" src="<?=base_url();?>java_scripts/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?=base_url();?>java_scripts/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?=base_url();?>java_scripts/jquery.ui.widget.js"></script>
<link rel="stylesheet" href="<?=base_url();?>css/jquery.ui.all.css">
<link rel="stylesheet" href="<?=base_url();?>css/demos.css">
	<script>
	$(function() {
		$( "#datepicker1" ).datepicker();
	});
	$(function() {
		$( "#datepicker2" ).datepicker();
	});
	</script>
<div>
<?php 
	$top_id=(!isset($top_id))?"":$top_id;
	$start_date=(!isset($start_date))?"":$start_date;
	$end_date=(!isset($end_date))?"":$end_date;
	$error_msg=(!isset($error))?"":$error;
?>
   <table border="0" width="100%">
      <tr>
      	<td style="font-size: 20px;font-weight: bold;">Add New - Vote Event</td>
      </tr>
      <tr>
      	<td align="center">
	      	<form action="" method="post">
	      		<table border="0" cellpadding="0" cellspacing="0" width="80%">
	      			<tr align="center">
	      				<td height="55" align="right">Vote Topic :&nbsp;&nbsp;&nbsp;</td>
	      				<td align="left">
	      					<select name="txttopic" id="txttopic">
	      						<?php 
	      							foreach ($topics->result_array() as $topic) {
	      								$selectMe=($top_id==$topic['top_id'])?"selected":"";
	      						?>
	      						<option <?=$selectMe?> value="<?=$topic['top_id']?>"><?=$topic['top_name']?></option>
	      						<?php 
	      							}
	      						?>
	      					</select>
	      				</td>
	      			</tr>
	      			<tr>
	      				<td height="55" align="right">Start Date :&nbsp;&nbsp;&nbsp;</td>
	      				<td><div style="width: 300px;"><input type="text" value="<?=$start_date?>" name="startdate" id="datepicker1"></div></td>
	      			</tr>
	      			<tr>
	      				<td height="55" align="right">End Date :&nbsp;&nbsp;&nbsp;</td>
	      				<td><div style="width: 300px;"><input type="text" value="<?=$end_date?>" name="enddate" id="datepicker2"></div></td>
	      			</tr>
	      			<tr>
	      				<td height="10" align="right"></td>
	      				<td><?=$error_msg?></td>
	      			</tr>
	     
	      			<tr align="center">
	      				<td>&nbsp;</td>
	      				<td height="20" colspan="2" align="left"><br/><input type="button" onclick="javascript:window.location='<?=site_url("vote_management/voteEvent")?>'" style="cursor: pointer;" value="Back"/>&nbsp;&nbsp;<input type="button" onclick="javascript:addEvent('<?=site_url("vote_management/addEvent")?>')" style="cursor: pointer;" value="Add"/></td>
	      			</tr>

	      		</table>
	      	</form>
      	</td>
      </tr>
   </table>
</div>
